package cn.cjj.gulimall.member.service;

import cn.cjj.gulimall.auth.vo.UserLoginVo;
import cn.cjj.gulimall.member.exception.EmailExistException;
import cn.cjj.gulimall.member.exception.PhoneExistException;
import cn.cjj.gulimall.member.exception.UsernameExistException;
import cn.cjj.gulimall.member.vo.SocialUser;
import cn.cjj.gulimall.member.vo.UserRegisterVo;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.cjj.common.utils.PageUtils;
import cn.cjj.gulimall.member.entity.MemberEntity;

import java.util.Map;

/**
 * 会员
 *
 * @author cjj
 * @email cjj@gmail.com
 * @date 2021-05-28 10:50:29
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void register(UserRegisterVo user);

    void checkUsernameUnique(String username) throws UsernameExistException;

    void checkEmailUnique(String email) throws EmailExistException;

    void checkPhoneUnique(String phone) throws PhoneExistException;

    MemberEntity login(UserLoginVo user);

    MemberEntity login(SocialUser user);
}

